package com.maxMgmt.Mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.maxMgmt.Dto.AddressDto;

public class AddressMapper implements RowMapper{

	@Override
	public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
		
		AddressDto addressDto = new AddressDto();
		
		addressDto.setAddrId(rs.getInt("ADDR_ID"));
		addressDto.setAddr1(rs.getString("ADDR1"));
		addressDto.setAddr2(rs.getString("ADDR2"));
		addressDto.setCity(rs.getString("CITY"));
		addressDto.setState(rs.getString("STATE"));
		addressDto.setPinCode(rs.getString("PINCODE"));
		
		return addressDto;
	}

}
